<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace app\api\controller;

/**
 * Description of Oss
 *
 * @author DevPHP
 * @version 2018-4-11
 */
class Oss {

    public function upload() {
        $filePath=env('root_path') . 'LICENSE.txt';
        if(!is_file($filePath)){
            exit('文件不存在');
        }
        $bucket=config('sdkaccount.ali_oss_bucket_name');
        $bucket=config('sdkaccountsu.cos_bucket');
        $result = \app\common\service\OssFactory::upload($bucket, 'public/aabbcc.txt', $filePath);
        var_export($result);
    }

}
